package com.springboot_shiyan3.Bean;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;
import java.util.List;
import java.util.Objects;

@Data
@Getter
@Setter
public class RegionStats {

    private String state;
    private String country;
    private int latestTotalCases;
    private int differFromPrevDEv;

    public RegionStats(String state, String country, int latestTotalCases, int differFromPrevDEv) {
        this.state = state;
        this.country = country;
        this.latestTotalCases = latestTotalCases;
        this.differFromPrevDEv = differFromPrevDEv;
    }

    public RegionStats() {
    }

    @Override
    public String toString() {
        return "RegionStats{" +
                "state='" + state + '\'' +
                ", country='" + country + '\'' +
                ", latestTotalCases=" + latestTotalCases +
                ", differFromPrevDEv=" + differFromPrevDEv +
                '}';
    }

    public String getState() {
        return state;
    }

    public String getCountry() {
        return country;
    }

    public int getLatestTotalCases() {
        return latestTotalCases;
    }

    public int getDifferFromPrevDEv() {
        return differFromPrevDEv;
    }

    public void setState(String state) {
        this.state = state;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public void setLatestTotalCases(int latestTotalCases) {
        this.latestTotalCases = latestTotalCases;
    }

    public void setDifferFromPrevDEv(int differFromPrevDEv) {
        this.differFromPrevDEv = differFromPrevDEv;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        RegionStats that = (RegionStats) o;
        return Objects.equals(state, that.state) &&
                Objects.equals(country, that.country);
    }
}
